home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 December / macformat-031.iso / mac / Shareware City / Comms / Quote Folder / Read Me < prev   
Encoding:
Text File  |  1995-09-01  |  3.6 KB  |  112 lines  |  [TEXT/ALFA]

  1.  
  2. Read Me for Quote 1.1
  3. =====================
  4.  
  5.  
  6. Quote is a CGI application for use with MacHTTP.  It responds to the 
  7. `sdoc' AppleEvent and returns a string containing a random quote read 
  8. from a file.
  9.  
  10. This program is written in Pocket Forth 6.3 for the Macintosh. See the 
  11. file `quote.4th' for the source code.  Thanks to Chris Heilman for help 
  12. with the AppleEvent handling.  And for making a neat little Forth 
  13. available to everyone!
  14.  
  15.  
  16. How to use it
  17. =============
  18.  
  19. Well, you need MacHTTP of course (or WebStar).
  20.  
  21. In addition you need the application `Quote.cgi' (do not change the name, 
  22. or keep the .cgi extension if you do).  You also need a text file that 
  23. contains the quotations.  This file must be in the following format:
  24.  
  25. 1. Each quotation must be on one line!  You can put HTML commands in the 
  26. quote, etc. but it must be on one line.  Most text editors let you make a 
  27. line as long as you like.  The upper limit is some ~2000 characters.
  28.  
  29. 2. The first line of the file contains the number of quotes in the file.  
  30. It must be a 4 digit number with leading zeros if necessary.  (This was 
  31. to make it easy for me to write the code -- call me lazy)
  32.  
  33. 3. The second line of the file contains the string to which the quote is 
  34. appended.  This string could be used to create a title or header for the 
  35. page.
  36.  
  37. 4. The third line of the file contains a string that is appended to the 
  38. end of each quote.  I use this string to jump back to my home page.
  39.  
  40. Note that it is entirely feasible to put *any* HTML commands in place of 
  41. the quotes so that you could have randomly chosen pictures displayed if 
  42. you wished.
  43.  
  44. NOTE!!!!!  The program *must* be running before MacHTTP tries to call 
  45. it.  When first run the program presents a standard Mac open dialog and 
  46. waits for you to chose the database file.  It then is ready to be used.  
  47. It will count the number of accesses since startup and has a small 
  48. window, but it can be hidden as well.
  49.  
  50.  
  51. An example quote file
  52. =====================
  53.  
  54. 0003
  55. <h2>The Quote...</h2><hr>
  56. <hr><a href="default.html"><i>Go back</i></a>
  57. <i>A stitch in time saves nine</i><br><b>-- Ben Franklin</b>
  58. <i>Fish and visitors smell in three days</i><br><b>-- Ben Franklin</b>
  59. <i>A penny saved is a penny earned</i><br><b>-- Ben Franklin(?)</b>
  60.  
  61.  
  62. This file has 3 quotes in it.  A randomly chosen quote would be returned 
  63. by the application as:
  64.  
  65. <html><h2>The Quote...</h2><hr><i>A stitch in time saves 
  66. nine</i><br><b>-- Ben Franklin</b><hr><a href="default.html"><i>Go 
  67. back</i></a></html>
  68.  
  69. The initial <html> and final </html> are added by the program.
  70.  
  71.  
  72. How to setup your web page
  73. ==========================
  74.  
  75. The application is called by placing the following HTML code in your web 
  76. page:
  77.  
  78. <FORM method=POST action="Quote.cgi">
  79. <INPUT type=submit value="A random quotation"> 
  80. </FORM>
  81.  
  82. Where "A random quotation" can be replaced with more meaningful text.
  83.  
  84.  
  85. Modifying the program
  86. =====================
  87.  
  88. First get Pocket Forth 6.3 off the net.  You will need a clean version of 
  89. the Pocket Forth application.  Rename it and drag the `quote.4th' file 
  90. onto it.  When loaded type  save bye  to save the program.  Open ResEdit 
  91. and copy all the resources from `quote.rsrc' into the application.  
  92. Change the file type from p4th to quot
  93.  
  94.  
  95. Contact information
  96. ===================
  97.  
  98. If you have questions or comments contact me at the address below.  If 
  99. you use the program I would appreciate you sending me the link so I can 
  100. see how it is working and what people are doing with it.
  101.  
  102. Ron Kneusel
  103. 8725 West Burdick Ave
  104. Milwaukee, WI  53227  USA
  105.  
  106. email: rkneusel@post.its.mcw.edu
  107. http://www.intmed.mcw.edu/rtk/
  108.  
  109. September 1995
  110.  
  111. AMDG
  112.